package com.itheima.tlias84.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;
import java.util.Map;

/**
 * 学生配置类
 * 1、指定前缀@ConfigurationProperties("student")
 * 2、变成been类@Configuration：包含了@Component
 */
//@ConfigurationProperties(prefix = "student")
//@ConfigurationProperties(value = "student")
@ConfigurationProperties("student")
@Configuration
@Data
public class StudentConfig {
    private String name;
    private Integer age;
    private String[] subjects;
    private List<String> teachers;
    private Map<String,String> family;
}
